function doLoadClick(){
    $(".item_box .item-shop").click(function (){
        let shopId=$(this).children(".hidden-val").text();
        let url = `/ruoyi/user-shop/${shopId}`;
        $("#mainContentId").data("shopId",shopId);
        jumphtml(url);
    });

    $(".item_box .item-name").click(function (){
        let itemId=$(this).children(".hidden-val").text();
        let url = `/ruoyi/item/${itemId}`;
        $("#mainContentId").data("itemId",itemId);
        jumphtml(url);
    });
}

function doClickCats(){
    $(".item-class-list div").click(function (){
        let catId = $(this).children(".hidden-val").text();
        let url = `/ruoyi/search/getitems?catId=${catId}`;
        $(".cat-items").empty();
        doLoadGetSearchItems(url);
    });
}


function doClickSearchItems(){
    $("#search-item").click(function (){
        let title = $(".search").val();
        if (!title){
            alert("请输入关键词");
            return;
        }
        let url = `/ruoyi/search/getitems?title=${title}`;
        $(".cat-items").empty();
        doLoadGetSearchItems(url);
    });
}
function doClickSearchShops(){
    $("#search-shop").click(function (){
        let shopName = $(".search").val();
        if (!shopName){
            alert("请输入关键词");
            return;
        }
        let url = `/ruoyi/search/getshops?shopName=${shopName}`;
        $(".cat-shops").empty();
        doGetShops(url);
    });
}
function doClickShopSearchItems(){
    $("#shopinsearch").click(function (){
        let title = $(".search").val();
        if (!title){
            alert("请输入关键词");
            return;
        }
        doGetShopItem(null,title);
    });
}
function doClickShops(){
    $(".shop-box").click(function (){
        let shopId = $(this).children(".hidden-val").text();
        let url = `/ruoyi/user-shop/${shopId}`;
        $("#mainContentId").data("shopId",shopId);
        jumphtml(url);
    });
}
function doStringtoDate(dateTime){
    let year = dateTime.getFullYear();
    let month = dateTime.getMonth()+1;
    let date = dateTime.getDate();
    let hours = dateTime.getHours();
    let min = dateTime.getMinutes();
    let seconds = dateTime.getSeconds();
    let dateTimes = year+"年"+month+"月"+date+"日 "+hours+"时"+min+"分"+seconds+"秒";
    return dateTimes;
}